Switching Language

It is possible to set the text used in the GUIs to one of several preset languages. Setting the GuiLanguage property in RapidSpellWebLauncher/RapidSpellWInline will change the text of the button and also pass on that value automatically to RapidSpellWeb. To customize button or label text, set the button value or label text properties accordingly, this will override the GuiLanguage set text. In VisualStudio, if the property has been changed and you want to reset the text to default, simply delete the entire field, this will reset the text to default. Due to RapidSpellWeb receiving it's GuiLanguage setting from RapidSpellWebLauncher, it is not possible for changes to GuiLanguage to be reflected in the RapidSpellWeb Control's appearance at design-time, this is a design-time only limitation, at run time the text will be in the chosen language.

To switch the UI and dictionary language set the RapidSpellWebLauncher/RapidSpellWInline properties GuiLanguage, LanguageParser and DictFile in either code-behind or a script block on the form.

Code Example Language Switcher

Using a select box to select the UI language and dictionary.

<%@ Register TagPrefix="rapidspellweb" Namespace="Keyoti.RapidSpell"
Assembly="Keyoti.RapidSpellWeb" %>
<%@ Page language="c#" AutoEventWireup="true" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    <script language="C#" runat="server">
    void LanguageChanged(object sender, EventArgs e){
        switch (LanguageList.SelectedItem.Value){
            case "English":
                RapidSpellWebLauncher1.GuiLanguage =
Keyoti.RapidSpell.LanguageType.ENGLISH;
                RapidSpellWebLauncher1.LanguageParser =
Keyoti.RapidSpell.LanguageType.ENGLISH;
                //Set dictionary file path on server here
                RapidSpellWebLauncher1.DictFile = "path\to\english.dict";
            break;
            case "Espa�ol":
                RapidSpellWebLauncher1.GuiLanguage =
Keyoti.RapidSpell.LanguageType.SPANISH;
                RapidSpellWebLauncher1.LanguageParser =
Keyoti.RapidSpell.LanguageType.SPANISH;
                //Set dictionary file path on server here
                RapidSpellWebLauncher1.DictFile = "path\to\spanish.dict";
            break;
            case "Fran�ais":
                RapidSpellWebLauncher1.GuiLanguage =
Keyoti.RapidSpell.LanguageType.FRENCH;
                RapidSpellWebLauncher1.LanguageParser =
Keyoti.RapidSpell.LanguageType.FRENCH;
                //Set dictionary file path on server here
                RapidSpellWebLauncher1.DictFile = "path\to\french.dict";
            break;
        }
    }
    </script>
    <body>
        <form id="Form1" method="post" runat="server">
            <asp:textbox id="TextBox1" runat="server" Width="288px"
TextMode="MultiLine" Height="216px"></asp:textbox>
            <rapidspellweb:rapidspellweblauncher
                id="RapidSpellWebLauncher1"
                runat="server"
                LookIntoHyphenatedText="True"
                LanguageParser="ENGLISH"
                RapidSpellWebPage="RapidSpellCheckerPopUp.aspx"
                TextComponentName="TextBox1" >
            </rapidspellweb:rapidspellweblauncher>
            <asp:DropDownList OnSelectedIndexChanged="LanguageChanged"
AutoPostBack="True" id="LanguageList" runat="server" Width="178px">
                <asp:ListItem Text="English" Value="English" selected />
                <asp:ListItem Text="Espa�ol" Value="Espa�ol" />
                <asp:ListItem Text="Fran�ais" Value="Fran�ais" />
            </asp:DropDownList>
        </form>
    </body>
</HTML>